# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=mprocs
pkgver=0.6.0
pkgrel=0
pkgdesc="Run multiple commands in parallel"
url="https://github.com/pvolok/mprocs"
arch="aarch64 armhf armv7 ppc64le x86 x86_64"  # blocked by rust/cargo
license="MIT"
makedepends="cargo"
source="https://github.com/pvolok/mprocs/archive/v$pkgver/mprocs-$pkgver.tar.gz"

export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_LTO="true"
export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
export CARGO_PROFILE_RELEASE_PANIC="abort"

prepare() {
	default_prepare

	cargo fetch --locked
}

build() {
	cargo build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -D -m755 target/release/mprocs -t "$pkgdir"/usr/bin/
}

sha512sums="
5fb2d2f6b09e9be4a774aba7e9d5362a6510874807b5288265132cfc6aead82d15b4c576e06cf216c12c5775a831f660995af5d40d18ad8c003fa390ad42538d  mprocs-0.6.0.tar.gz
"
